﻿package {
	import asunit.framework.TestCase;	

	/**
	 * @author colin
	 */
	public class StringTest extends TestCase{
		private var _instance:String;

		/**
 		 * Constructor
 		 *
 		 * @param testMethod Name of the method to test
 		 */
 		public function StringTest(testMethod:String=null) {
 			super(testMethod);
 		}

		/**
	 	 * Prepare for test, create instance of class that we are testing.
	 	 * Invoked by TestCase.runMethod function.
	 	 */
		protected override function setUp():void {
	 		_instance = new String();
	 	}

		/**
	 	 * Clean up after test, delete instance of class that we were testing.
	 	 */
	 	protected override function tearDown():void {
	 		_instance = null;
	 	}

		/**
	 	 * Test of whether or not class properly instantiated
	 	 */
	 	public function testInstantiated():void {
	 		assertTrue("Example instantiated", _instance is String);
	 	}

		/**
	 	 * Test the addition method on example
	 	 */
	 	public function testToUpperCase():void {
	 		var result:String = String("helloworld").toUpperCase();
	 		assertEquals("Expected:HELLOWORLD Received:"+result, result, 'HELLOWORLD');
	 	}
	}
}
